Depending on the applications and on the type of memory used, there are several writing modes for writing a word in a memory. In a first writing mode, the memory cells provided for storing the bits of the word to be written are previously erased. Then, the memory cells corresponding to the bits in the programmed state of the word to be written are programmed. In a second writing mode, a word is written in the memory by directly programming the memory cells corresponding to the bits in the programmed state of the word to be written, without any prior erasing operation. Thus, only the memory cells that were in the erased state before the programming and which correspond, by their rank, to bits in the programmed state of the word to be written, change state. This writing mode is particularly used in abacus-type counters, such as automobile odometers for example, or in event storing or counting applications.
In certain applications such as contactless chips, a reader sends write commands in the form of electromagnetic waves to an integrated circuit electrically powered using the radio-electric field radiated by the reader. In these applications, transmission errors can occur due to electromagnetic disturbances. Write errors can also occur in the memory, particularly due to an insufficient supply voltage of the integrated circuit, when the latter is situated at the limit of the radioelectric field radiated by the reader. It is therefore desirable to make sure that a write command has effectively been executed by the integrated circuit.
Generally speaking, the execution of a write command is checked by sending a read command to the integrated circuit for reading the memory cells of the word that has been written in the memory. In the case of a contactless chip card integrated circuit, the writing report issued by the integrated circuit is awaited before sending the verification read command. Then, there is the waiting for the word read in response to the read command to be received, and to compare the word read with the word to be written. Certain integrated circuits only comprise one sense amplifier. A word is therefore read bit by bit. The writing of a word in a memory including the execution of such a verification procedure can thus be relatively long.
Furthermore, certain integrated circuits support the two writing modes previously described. In the writing mode with prior erasing, the verification of the writing involves checking the equality of the value of each bit of the word to be written and of the word read after writing. In the writing mode without prior erasing, this verification procedure cannot be applied, owing to the fact that certain bits in the erased state of the word to be written may, on the contrary, be in the programmed state in the word read after writing.